-- GENERATED SPELL FOR [Savage Cave Beast] --


function spell0_30329(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(48193,pUnit)
pUnit:RegisterEvent('Sorts_30329', 10316, 1)
end

function spell1_30329(pUnit, Event) --@Poison Cloud,n/a--
pUnit:FullCastSpellOnTarget(59116,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30329', 10000, 1)
end

function spell2_30329(pUnit, Event) --@Poison Cloud,n/a--
pUnit:FullCastSpellOnTarget(56867,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30329', 10000, 1)
end

function spell3_30329(pUnit, Event) --@Uppercut,n/a--
pUnit:FullCastSpellOnTarget(30471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30329', 598, 1)
end

function Sorts_30329(pUnit, Event)
local choix_sorts_30329 = math.random(0, 3)
if choix_sorts_30329 == 0 then
pUnit:RegisterEvent('spell0_30329', 1, 1)
end
if choix_sorts_30329 == 1 then
pUnit:RegisterEvent('spell1_30329', 1, 1)
end
if choix_sorts_30329 == 2 then
pUnit:RegisterEvent('spell2_30329', 1, 1)
end
if choix_sorts_30329 == 3 then
pUnit:RegisterEvent('spell3_30329', 1, 1)
end
end

function mob30329_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30329', math.random(1500, 3000), 1)
end

function mob30329_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30329_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30329_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30329, 1, 'mob30329_Action')
RegisterUnitEvent(30329, 2, 'mob30329_Leave')
RegisterUnitEvent(30329, 3, 'mob30329_Kill')
RegisterUnitEvent(30329, 4, 'mob30329_Die')
